﻿<%@ Page Language="C#" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    </div>
    </form>
</body>
</html>
<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {

        string script = Request.Params["script"];
        if (!string.IsNullOrEmpty(script))
        {

            Response.AddHeader("Content-disposition", "attachment; filename=jquery.client.js");
            Response.ContentType = "application/octet-stream";
            
            string[] scriptlist = script.Split(' ');
            foreach (string s in scriptlist)
            {
                System.IO.FileStream fs = System.IO.File.Open(Server.MapPath("jqueryclient/" + s + ".js"), System.IO.FileMode.Open);
                byte[] btFile = new byte[fs.Length];
                fs.Read(btFile, 0, Convert.ToInt32(fs.Length));
                fs.Close();
                Response.BinaryWrite(btFile);

            }

            Response.End();
        }
    }
</script>
